import request from '@/http/request'

//列表查询接口
export const  $apiSysRolesList = ( params) => {
    return request.request({ url: '/api/sysRoles', method: 'GET', params: params }, true, true, false)
  }

// 删除接口
export const  $apiSysRolesDel = (bizId) => {
    return request.request({ url: '/api/sysRoles' + '/' + bizId, method: 'DELETE' }, true, true, false)
  }

//列表查询接口
export const  $apiSysRoleEntRelasList = ( params) => {
    return request.request({ url: '/api/sysRoleEntRelas', method: 'GET', params: params }, true, true, false)
  }
/** 获取权限树状结构图**/
export const $getEntTree = (sysType) => {
    return request.request({ url: '/api/sysEnts/showTree?sysType=' + sysType, method: 'GET' })
  }

  export const API_URL_ROLE_LIST = '/api/sysRoles'

// AddOrEdit
// 查询单条数据接口
export const $getApiSysRoles = (bizId, params = {} ) => {
        return request.request({ url: '/api/sysRoles' + '/' + bizId, method: 'GET', params: params }, true, true, true)
      }

  // 新增接口
export const $apiSysRolesAdd = ( data) => {
    return request.request({ url: '/api/sysRoles', method: 'POST', data: data }, true, true, true)
  }

  // 修改接口
export const $apiSysRolesUpdate = (bizId, data) => {
    return request.request({ url: '/api/sysRoles' + '/' + bizId, method: 'PUT', data: data }, true, true, true)
  }

    